package com.azier.kapacitor.script.node.nodebind;

import com.azier.kapacitor.script.node.HttpPostNode;
import com.azier.kapacitor.script.node.Node;

/**
* 1 * @Author: luoj
* 2 * @Date: 2019/11/8 11:27
* 3
*/

/**
Creates an HTTP Post node that POSTS received data to the provided HTTP endpoint. HttpPost expects 0 or 1 arguments. If 0 arguments are provided, you must specify an endpoint property method.
**/

/**
创建一个HTTP Post节点，该节点将接收到的数据POSTS到提供的HTTP端点。 HttpPost需要0或1个参数。如果提供了0个参数，则必须指定一个端点属性方法。
**/
public interface HttpPostNodeBind extends Node {
    /**
    Creates an HTTP Post node that POSTS received data to the provided HTTP endpoint. HttpPost expects 0 or 1 arguments. If 0 arguments are provided, you must specify an endpoint property method.
    **/
    /**
    创建一个HTTP Post节点，该节点将接收到的数据POSTS到提供的HTTP端点。 HttpPost需要0或1个参数。如果提供了0个参数，则必须指定一个端点属性方法。
    **/
    default HttpPostNode httpPost(String ...url){
        HttpPostNode nextNode = new HttpPostNode(url);
        this.setNextNode(nextNode);
        nextNode.zetHeadNode(this.getHeadNode());
        return nextNode;
    }
}